home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Personal Computer World 2009 February
/
PCWFEB09.iso
/
Software
/
Resources
/
Chat & Communication
/
Digsby build 37
/
digsby_setup.exe
/
lib
/
gui
/
imwin
/
imwindnd.pyo
(
.txt
)
< prev
next >
Wrap
Python Compiled Bytecode
|
2008-10-13
|
2KB
|
55 lines
# Source Generated with Decompyle++
# File: in.pyo (Python 2.5)
import wx
import util
from gui import contactdialogs
class ImWinDropTarget(wx.PyDropTarget):
def __init__(self, parent):
wx.PyDropTarget.__init__(self)
self.dragged = wx.DataObjectComposite()
self.imwin = parent
drag_types = dict(file = wx.FileDataObject(), text = wx.TextDataObject(), bitmap = wx.PyBitmapDataObject())
for dt, dobjs in drag_types.iteritems():
setattr(self.dragged, dt, dobjs)
for v in drag_types.itervalues():
self.dragged.Add(v)
self.SetDataObject(self.dragged)
def OnEnter(self, x, y, d):
return d
def OnDrop(self, x, y):
return True
def OnDragOver(self, x, y, d):
return wx.DragMove
def OnData(self, x, y, d):
self.GetData()
dragged = self.dragged
dropped = util.Storage(files = dragged.file.GetFilenames(), bitmap = dragged.bitmap.GetBitmap(), text = dragged.text.GetText())
if dropped.files:
contactdialogs.send_files(self.imwin, self.imwin.convo.buddy, dropped.files)
return True
if dropped.bitmap:
return True
if dropped.text:
self.imwin.input_area.SetValue(dropped.text)
self.imwin.input_area.tc.SetSelection(-1, -1)
return True
return False